home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / coolcalc / readme.txt < prev   
Encoding:
Text File  |  1995-12-22  |  4.0 KB  |  91 lines

  1. COOL CALCULATOR 1.0
  2. ===================
  3.  
  4. The Cool Calculator 1.0 program is a product from the Pie Right
  5. software family offered by abc Systems of Bridgeport, CT. It is
  6. a simple business calculator in which you can either type your
  7. expressions (including use of parentheses) are build them by
  8. clicking on a collection of buttons (1,2,3,4,5,6,7,8,9,0,(,),*,
  9. +,-,/,=). Pysically it is a simple interface (Delphi Form) to
  10. an expression evaluation engine originally written by James L.
  11. Dean in 1985, and overhauled and enhanced by David J. Firth in
  12. 1991. "I'll be back" with a component version of this calculator
  13. sometime in the upcoming weeks. 
  14.  
  15. I have not surfaced all the functionality of David's program, but
  16. it is not difficult to do so, if you are so inclined. Things left
  17. unsurfaced are: ABS, ARCTAN, COS, EXP, LN, SQR, SQRT, and PI 
  18. functions, along with the ability to use variables.
  19.  
  20. The code for David J. Wirth's version of the evaluation engine and
  21. his additional RPN evaluation engine can be found on the Delphi
  22. forum on CompuServe in the file called EEV10.ZIP. In extending the
  23. Cool Calculator are using the calculation engine in your programs
  24. you will want to download that file. I have included some of
  25. David's information about his program below.
  26.  
  27. NOTE: Be advised we created Cool Calculator 1.0 just for kicks and
  28. did it in under 2 hours, and because we had no real application in
  29. mind when doing it, we haven't tested it thoroughly. However,
  30. we are willing to try and answer any questions you send our way.
  31.  
  32. EEV10.ZIP
  33. =========
  34.  
  35. Expression Evaluator Toolkit V1.00 Revision 0
  36.  
  37. These files provide you with a complete API for 2 mathematical
  38. expression evaluators.  One is written to evaluate infix (algebraic)
  39. expressions.  The other is written to evaluate postfix (RPN)
  40. expressions.
  41.  
  42. INFIX.PAS is based upon a program called CALC.PAS by James L. Dean of
  43. New Orleans, LA.  His program, dated 1985, provided the complete
  44. recursive descent infix expression evaluator.  CALC.PAS was downloaded
  45. from CIS and had no copyright notice of any kind.  Because of the lack
  46. of any copyright, I assume that I can write a derivitive work. I added
  47. the variables support and organized the code for use with TP5 or higher.
  48. His name, address, and original comments (very few) have been competely
  49. preserved in the source and my documentation file.
  50.  
  51. ------------------------------------------------------------------
  52. INFIX.PAS
  53.  
  54. Note: We at abc Systems had to rename all the "result" vars in the
  55. INFIX.PAS program to get it to compile under Delphi as RESULT is 
  56. a key word in Delphi. However, we didn't have to do anything else.
  57. ------------------------------------------------------------------
  58.  
  59.     This unit uses recursive descent to evaluate expressions
  60.     written in infix notation.  The operations addition (+),
  61.     subtraction (-), multiplication (*), and division (/) are supported,
  62.     as are the functions ABS, ARCTAN, COS, EXP, LN, SQR, and SQRT.
  63.     PI returns the value for pi.  Results exceeding 1.0E37 are reported
  64.     as overflows.  Results less than 1.0E-37 are set to zero.
  65.  
  66.          Written by:
  67.  
  68.          James L. Dean
  69.          406 40th Street
  70.          New Orleans, LA 70124
  71.          February 25, 1985
  72.  
  73.          Modified by:
  74.  
  75.          David J. Firth
  76.          5665-A2 Parkville St.
  77.          Columbus, OH 43229
  78.          December 26, 1991
  79.  
  80.      This code was originally written as a stand-alone program using
  81.      standard Pascal.  In that form the program wasn't very useful.
  82.      I have taken the code and reorganized it for use with Turbo Pascal
  83.      versions 5.x or 6.0.  I have added six procedures to this code
  84.      for use as an API (application program interface).  Those six
  85.      routines are described in this file.
  86.  
  87.      In addition, I have reworked it to support variables by adding a
  88.      preprocessor.  The variables are preceded and followed by a @ symbol,
  89.      are case sensitive, and must be less than 20 characters long
  90.      (including the 2 @s). For example, the following would all be valid
  91.      variables: